<template>
  <u-swiper
    :list="rows"
    :autoplay="false"
    radius="0"
    height="250"
    bgColor="transparent"
    indicator
    keyName="img"
    @click="onClick"
  ></u-swiper>
</template>

<script>
export default {
  props: {
    rows: Array,
  },
  data() {
    return {};
  },
  methods: {
    onClick(idx) {
      const row = this.rows[idx];
      if (row.link) {
        this.$navTo(row.link);
        return;
      }
      this.$h.showImg(
        idx,
        this.rows.map((it) => it.img)
      );
    },
  },
};
</script>
